1. Field of the Invention
Apparatuses and methods consistent with the present invention relate to video coding and decoding, and more particularly, to transforming and inverse-transforming an image, in which a plurality of frequency transform algorithms are selectively used.
2. Description of the Related Art
Various transform algorithms have been proposed for image and video compression. One of the most widely used transform algorithms may be either a block-based transform algorithm or an image-based transform algorithm. Examples of the block-based transform algorithm include a Karhuhen-Loeve transform (KLT) algorithm, a singular value decomposition (SVD) algorithm, and a discrete cosine transform (DCT) algorithm. The block-based transform algorithm is used for transforming an N×N image block or an error sample block.
According to the DCT algorithm, an input image signal is divided into a low frequency component and a high frequency component. Energy is concentrated in the low frequency component as a result of the DCT algorithm. Thus, the high frequency component can be easily removed in the process of quantization. A human visual system is sensitive to the loss of low frequency component rather than the loss of high frequency component. Accordingly, even if the high frequency component is removed, the image can be compressed without significant degradation of image quality.
FIG. 1 is a schematic view for explaining a concept of a related art DCT algorithm.
Referring to FIG. 1, according to the related art DCT algorithm, an N×N input block 10 is subject to a column-wise transform 20 and a row-wise transform 30 to form an N×N coefficient block 40. A forward DCT is defined as Y=AxAT, where x denotes the N×N input block 10, A denotes an N×N DCT matrix, and Y denotes the N×N coefficient block 40. To perform a first matrix multiplication Ax, each column of x, that is, the N×N input block 10, is subject to a one-dimensional DCT. To multiply Ax by a transposition matrix AT, each row of x is subject to the one-dimensional DCT.
αik is (i,k) component of the N×N DCT matrix A and is expressed by Equation 1.
                                          a            ik                    -                                    α              i                        ⁢            cos                          ⁣                                            π              ⁡                              (                                                      2                    ⁢                    k                                    +                  1                                )                                      ⁢            i                                2            ⁢            N                          ⁢                                  ⁢                  (                      i            ,                          k              =              0                        ,            …            ⁢                                                  ,                          N              -              1                        ,                                          α                0                            =                                                1                  N                                                      ,                                          α                i                            =                                                2                  N                                                              )                                    [                  Equation          ⁢                                          ⁢          1                ]            
FIG. 2 illustrates a standard basis pattern for 8×8 DCT. When an N×N input block is subject to DCT, an N×N coefficient block composed of DCT coefficients is created. The DCT coefficients are associated with a weight factor of a set of standard basis patterns as shown in FIG. 2. Referring to FIG. 2, the standard basis pattern is configured in combination of a horizontal cosine function and a vertical cosine function. An image block may be reconfigured by combining respective patterns included in the standard basis pattern after being multiplied by DCT coefficients corresponding to the respective patterns.
In the related art scheme, the same DCT is used irrespective of image signal characteristics. Therefore, there is a need for increasing compression efficiency by adaptively performing DCT according to the image signal characteristics.